package edu.hgnu.hello;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author:      zyl
 * @ReWroteBy:  Tara.Li(李春侣)
 * @date:  2021-08-09 21:10:50
 * @Description:  one to one 工作模式
 */
@Component
@RabbitListener(queuesToDeclare = @Queue(value = "hello",durable = "false",autoDelete = "true"))
public class HelloWorld {

    @RabbitHandler
    public void receiver1(String msg){
        System.out.println("============================================");
        System.out.println("message="+msg);
        System.out.println("============================================");
    }

}
